home *** CD-ROM | disk | FTP | other *** search
/ Windows Game Programming for Dummies (2nd Edition) / WinGamProgFD.iso / pc / DirectX SDK / DXSDK / samples / Multimedia / DirectPlay / LobbyClient / readme.txt < prev    next >
Encoding:
Text File  |  2001-10-10  |  4.4 KB  |  91 lines

  1. //-----------------------------------------------------------------------------
  2. // 
  3. // Sample Name: LobbyClient Sample
  4. // 
  5. // Copyright (c) 1999-2001 Microsoft Corporation. All rights reserved.
  6. // 
  7. //-----------------------------------------------------------------------------
  8.  
  9.  
  10. Description
  11. ===========
  12.   LobbyClient is a simple lobby client.  It displays all registered DirectPlay 
  13.   applications on the local system.  It allows the 
  14.   user to launch one or more of these applications using a chosen 
  15.   service provider.  A launched lobbied application may be told to either 
  16.   join or host a game.
  17.  
  18. Path
  19. ====
  20.   Source: DXSDK\Samples\Multimedia\DirectPlay\LobbyClient 
  21.  
  22.   Executable: DXSDK\Samples\Multimedia\DirectPlay\Bin
  23.  
  24. User's Guide
  25. ============
  26.   Choose launch settings from dialog, and click "Launch App".  The
  27.   lobby client will launch the app selected based on the settings in the UI.
  28.   The active connections list will display the handle to all the current 
  29.   lobbied applications.  Clicking on "Send Message" will send a lobby message
  30.   to the lobbied application.  This done mainly for demonstration purposes.  A more
  31.   complex lobby client may want to use this functionality in a more meaningful way
  32.   by passing a message that the lobbied application responds to.
  33.  
  34. Programming Notes
  35. =================
  36.     * Initialize DirectPlay. See InitDirectPlay()
  37.         1. Init COM with CoInitialize()
  38.         2. Create a IIDirectPlay8Peer with CoCreateInstance()
  39.         3. Call IDirectPlay8Peer::Initialize to tell the interface about our 
  40.            message handler
  41.         4. Create a IDirectPlay8LobbyClient with CoCreateInstance()
  42.         5. Call IDirectPlay8LobbyClient::Initialize to tell the interface 
  43.            about our lobby message handler
  44.         
  45.  
  46.     * Initialize dialog box. See OnInitDialog()
  47.         1. Enumerate the registered lobbied applications and display them
  48.            in the dialog listbox.  See EnumRegisteredApplications()
  49.         2. Enumerate the DirectPlay service providers and display them
  50.            in the dialog listbox.  See EnumServiceProviders()
  51.         3. Whenever a new service provider is selected (and upon init) then
  52.            enumerate the service provider's adapters.  See EnumAdapters().
  53.  
  54.     * When "Launch App" button is clicked.  See LaunchApp()
  55.         1. Fill out a DPL_CONNECT_INFO struct.  This is complex
  56.            since it contains the host and device addresses as well as
  57.            the DPN_APPLICATION_DESC.  See LaunchApp() and 
  58.            AllocAndInitConnectSettings().
  59.         2. Call IDirectPlay8LobbyClient::ConnectApplication() passing in
  60.            the DPL_CONNECT_INFO struct.
  61.         3. Free the DPL_CONNECT_INFO struct. This is also complex since this 
  62.            struct has a number of DPlay addresses.  See FreeConnectSettings().
  63.         
  64.    * Upon DirectPlay Lobby messages. See DirectPlayLobbyMessageHandler()
  65.         - Upon DPL_MSGID_DISCONNECT:
  66.             pDisconnectMsg->hDisconnectId will contain the handle of the 
  67.             lobbied application that was disconnected, and 
  68.             pDisconnectMsg->hrReason will be the reason.  This simple 
  69.             sample just pops up a message box.
  70.         - Upon DPL_MSGID_RECEIVE:
  71.             The lobbied application sent the client data.  This simple sample 
  72.             doesn't respond to any message.
  73.         - Upon DPL_MSGID_SESSION_STATUS:
  74.             A lobbied application has changed its status.  pStatusMsg->hSender 
  75.             will one of several predefined status codes.  This simple
  76.             sample just updated the UI showing that the lobby status has
  77.             updated, however more complex lobby clients many want to take action.
  78.         - Upon DPL_MSGID_CONNECTION_SETTINGS:
  79.             A lobbied application has changed its connection settings.  This
  80.             simple lobby client doesn't take any action however, more complex
  81.             clients may want to take action.
  82.             
  83.    * When "Send Message" is clicked. See SendMsgToApp()
  84.         Call IDirectPlay8LobbyClient::Send() with the handle of the 
  85.         lobbied application to send the message to, and the buffer to send.
  86.         
  87.    * When "Disconnect" is clicked. See DisconnectFromApp()
  88.         Call IDirectPlay8LobbyClient::ReleaseApplication() with the handle of 
  89.         lobbied application to disconnect from.
  90.             
  91.